import {Read,Delete,Save,ReadOne} from './storeutil'
const KEY = 'Datasource'
export interface DatasourceItem{
    id:string,
    type: string,
    name: string,
    port: number,
    host: string,
    username: string,
    password: string,
}
export function ReadDatasource(){
    return Read(KEY)
}
export function SaveDatasource(item:DatasourceItem){
    Save(KEY,item)
}
export function DeleteDatasource(id:string){
    Delete(KEY,id)
}
export function ReadOneDatasource(id){
    return ReadOne(KEY,id)
}